using System;

public class RecFact
{
    static void Main()
    {
        int value = Int16.Parse(Console.ReadLine());

        Console.WriteLine((int)rFact(value));
    }

    public static long rFact(int n)
    {
        if(n == 0)
        {
            return 1;
        }
        return n * rFact(n - 1);
    }
}
